package com.wy.controller;

import com.wy.client.UserClient;
import com.wy.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Author: wy
 * @Date:2019/11/1 11:53
 */

@RestController
@RequestMapping("/fc")
public class FeignController {

    @Autowired
    private UserClient userClient;

    @GetMapping("/{id}")
    public User getUser(@PathVariable Long id){

        return   userClient.getUserById(id);
    }
}
